/**
* 
* Sonde system Sond class 
* Copyright (c) 2009 Ecole Centrale de Nantes IRCCyN  
* 
* see <a href="{@docRoot}/Documentation/sonde.html"> for more information</a>
* 
* @author: Urunuela Richard
* @version 3.2
*/
package report;

import java.util.StringTokenizer;

import programme.GUI.JConsole;

public class sonde {
	/**
	 * the output 
	 */
	output theOutPut;
	/**
	 * 
	 * @param o
	 */
	public sonde(output o) {
		this.theOutPut  = o;
	}
/**
 * 
 */
	public sonde() {
	}
/**
 *  field  from own implementation
 * @param commande
 */
	public void externalData(String commande) {
	}
	/**
	 * field from supercalss 
	 * @param commande
	 */
	public void internalData(String commande) {
	}
	/**
	 * parse if its internal or external data 
	 */
	
	public boolean parse(String ligne){
	if (ligne.contains(";")){
		return true;
	}
	if (ligne.contains("@")){
			//commande interne
			StringTokenizer item = new StringTokenizer(ligne,"@");
			String commande= item.nextToken();
			this.externalData(commande);
		
		}
		else if (ligne.contains("#")){
			StringTokenizer item = new StringTokenizer(ligne,"#");
			String commande= item.nextToken();
			this.internalData(commande);
			
		}
		
		return true;
	}


}
